package elm.example.dao;

import elm.example.po.Admin;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/*
    classDescription:管理员Dao接口，SpringBoot框架根据函数名自动编写sql语言
*/

@Repository
   public interface IAdminDao extends CrudRepository<Admin, Integer> {
   //根据用户名和密码查找管理员
   Optional<Admin> findAdminByAdminNameAndPassword(String adminName, String password);
   Optional<Admin> findAdminByAdminName(String adminName);
}
